require("Buffer.js");

var lb = new medusa.LineBuffer(20, 100);

lb.WriteInt32LE(100);
cc.log("----------LineBuffer::ReadInt32:" + lb.ReadInt32LE());

lb.WriteFloat32LE(3.14159);
cc.log("----------LineBuffer::ReadFloat32:" + lb.ReadFloat32LE());

lb.WriteFloat64LE(Math.PI);
cc.log("----------LineBuffer::ReadFloat64:" + lb.ReadFloat64LE());

lb.WriteFloat32BE(Math.PI);
cc.log("----------LineBuffer::ReadFloat32:" + lb.ReadFloat32BE());

lb.WriteFloat64BE(Math.PI);
cc.log("----------LineBuffer::ReadFloat64:" + lb.ReadFloat64BE());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());

lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());

cc.log("----------end");

var lb = new medusa.RingBuffer(20, 100);

lb.WriteInt32LE(100);
cc.log("----------LineBuffer::ReadInt32:" + lb.ReadInt32LE());

lb.WriteFloat32LE(3.14159);
cc.log("----------LineBuffer::ReadFloat32:" + lb.ReadFloat32LE());

lb.WriteFloat64LE(Math.PI);
cc.log("----------LineBuffer::ReadFloat64:" + lb.ReadFloat64LE());

lb.WriteFloat32BE(Math.PI);
cc.log("----------LineBuffer::ReadFloat32:" + lb.ReadFloat32BE());

lb.WriteFloat64BE(Math.PI);
cc.log("----------LineBuffer::ReadFloat64:" + lb.ReadFloat64BE());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());


lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());

lb.WriteString("1234567890abcdefghijklmnopqrstuvwxyz");
cc.log("----------LineBuffer::ReadString:" + lb.ReadString());

cc.log("----------end");
